<Window x:Class="ICSharpCode.XamlBinding.PowerToys.Dialogs.EditGridColumnsAndRowsDialog"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
	Title="Edit grid columns and rows"
	Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
	WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow">
	<Window.Resources>
		<Style x:Key="normal" TargetType="{x:Type Button}">
			<Setter Property="Margin" Value="3" />
			<Setter Property="Padding" Value="3" />
		</Style>
		<ControlTemplate x:Key="itemTemplate" TargetType="{x:Type Label}">
			<ControlTemplate.Triggers>
				<EventTrigger RoutedEvent="MouseEnter">
					<BeginStoryboard>
						<Storyboard>
							<ColorAnimation
								Storyboard.TargetName="BorderControl" Storyboard.TargetProperty="Background.Color"
								From="Gray" To="DarkGray" Duration="0:0:0.1" />
						</Storyboard>
					</BeginStoryboard>
				</EventTrigger>
				<EventTrigger RoutedEvent="MouseLeave">
					<BeginStoryboard>
						<Storyboard>
							<ColorAnimation
								Storyboard.TargetName="BorderControl" Storyboard.TargetProperty="Background.Color"
								From="DarkGray" To="Gray" Duration="0:0:0.1" />
						</Storyboard>
					</BeginStoryboard>
				</EventTrigger>
			</ControlTemplate.Triggers>
			<Border x:Name="BorderControl" Background="Gray" CornerRadius="5" Margin="3" Padding="5">
				<DockPanel>
					<Button x:Name="btnDeleteItem" Content="r" Tag="{TemplateBinding Tag}" FontFamily="Webdings"
						FontSize="10" FontWeight="Bold" DockPanel.Dock="Right" Click="BtnDeleteItemClick" />
					<TextBlock Tag="{TemplateBinding Tag}" Text="{TemplateBinding Content}" />
				</DockPanel>
			</Border>
		</ControlTemplate>
	</Window.Resources>
	<DockPanel>
		<StackPanel Background="WhiteSmoke" AllowDrop="True" x:Name="buttonPanel" Drop="ButtonPanelDrop" DragOver="ButtonPanelDragOver" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch">
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
				<Button x:Name="btnOK" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" Style="{StaticResource normal}" />
				<Button x:Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" Style="{StaticResource normal}" />
			</StackPanel>
		</StackPanel>
		<StackPanel Background="WhiteSmoke" AllowDrop="True" x:Name="dropPanel" Drop="DropPanelDrop" DragOver="DropPanelDragOver" DockPanel.Dock="Right" Width="25" />
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="*" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>
			<Grid Grid.Column="1" x:Name="columnWidthGrid" />
			<Grid Grid.Row="1" x:Name="rowHeightGrid" />
			<Grid Grid.Column="1" Grid.Row="1" x:Name="gridDisplay" ShowGridLines="True" />
		</Grid>
	</DockPanel>
</Window>